<!DOCTYPE html>
<html lang="ja">
<head>
    <meta charset="UTF-8">
    <title>ご注文 | 買い物カゴ | デンタルダイヤモンド社</title>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta name="description" content="デンタルダイヤモンド社 :: 月刊デンタルダイヤモンド、DH Styleをはじめ、様々な書籍の情報閲覧が可能です。またその場で購入ができるオンラインショッピングも充実しております。">
    <meta name="keywords" content="補綴,咬合,有床義歯,クラウンブリッジ,インプラント,保存修復,歯内療法,歯周治療,歯科矯正,口腔外科,口腔診断,歯科X線,全身管理,予防歯科,高齢者歯科,若手歯科医のための臨床の技,月刊,チェアーサイドのガイドブック,ポケットブック,医事,経営,社会保険,スタッフ教育,待合室・患者指導用絵本,診療説明用リーフレット,デンタル,ダイヤモンド,デンタルダイヤモンド,歯学書,歯科">
    <!-- stylesheets -->
    <link rel="stylesheet" href="pc/assets/css/main.css" media="screen">
    <link rel="stylesheet" href="pc/assets/css/print.css" media="print">
    <!-- javascript -->
    <script src="pc/assets/js/html5shiv-printshiv.js" type="text/javascript"></script>
    <script src="pc/assets/js/search_txt.js" type="text/JavaScript"></script>
    <script src="pc/assets/js/func.js" type="text/JavaScript"></script>
    <script src="pc/assets/js/jquery-1.7.2.js" type="text/javascript"></script>
    <!-- <script src="pc/assets/js/jquery.cookie.js" type="text/JavaScript"></script> -->
    <script src="/__utm.js" type="text/javascript"></script>
    <script src="./assets/scripts/plugins/zip2address.js" type="text/javascript"></script>
    <!--[if lt IE 9]>
		<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
		<script src="pc/assets/js/DOMAssistantCompressed-2.8.1.js" type="text/javascript"></script>
		<script src="pc/assets/js/selectivizr-min.js" type="text/javascript"></script>
		<script src="pc/assets/js/selectivizr.js" type="text/javascript"></script>
	<![endif]-->
    <script type="text/javascript">
    function addressradiochange()
    {
	    if($("[otheraddr]").length>0)
	    {
	        if($("[otheraddr]").prop("checked"))
	        {
	            $("#otheraddrtable").show();
	        }
	        else
	        {
	            $("#otheraddrtable").hide();
	        }
        }
        else
        {
        	$("#otheraddrtable").show();
        }
    }

    function checknewaddress()
    {
        if($("#chknewaddress").prop("checked"))
        {
            $("#txtnewaddress").prop("disabled", false);
        }
        else
        {
            $("#txtnewaddress").prop("disabled", true);
        }
    }

function lasterCheck()
{
return RegisterAddressCheck();
}

function sendAddressCheck()
{
  var objSel = document.getElementById("selarea");
				  selchange(objSel);
return true;
}

function RegisterAddressCheck()
{
			var objSel = document.getElementById("rselarea");
			sel_change(objSel);

		   return sendAddressCheck();

}

//
//  地址更新检查
//

function UpdateCheck()
{
 submitAddress();
}

function getRadio(str)
{

$(document).ready(function()
{

//alert($("#td_pay"+str).val());
//alert($("#td_pay"+str).attr("value"));

var testadd=Number($("#td_pay"+str).attr("value"))+Number($("#td_send"+str).attr("value"))-Number($("#td_sendPrice").attr("value"));

//alert($("#td_pay"+str).attr("value"));

//alert($("#td_send"+str).attr("value"));

//alert($("#td_sendPrice").attr("value"));

var testsendPrice=Number($("#td_pay"+str).attr("value"))+Number($("#td_send"+str).attr("value"));

$("#td_sendPrice").attr("value",Number(testsendPrice));//填充内容

$("#td_sendPrice").html("¥"+(Number(testsendPrice)).toFixed(0));

var testsumPrice=$("#td_sumPrice").attr("value");

var testSumgoodsPrice=$("#td_SumgoodsPrice").attr("value");

// alert(testSumgoodsPrice);

$("#td_sumPrice").attr("value",Number(testadd)+Number(testsumPrice));

$("#td_sumPrice").html("¥"+(Number(testadd)+Number(testsumPrice)).toFixed(0));



checkcardstate();

});



}

function checkcardstate()
{
var str_id=$('input:radio[name="payway"]:checked').attr("idvalue");

if(str_id.indexOf("3")>=0)

{

   $("#div_card").show();
   $("#div_card").val("1");
	$("#h_card_state").val("1");
   $("#h1_card").show();
}
else
{

$("#div_card").hide();
 $("#h1_card").hide();
  $("#h_card_state").val("0");
  $("#div_card").val("0");

}

}
function CancelUpdate()
{

 $("#wrapper").append($("#Tip"));
  $('#newtr').remove();

   $("#Tip").hide();


return false ;

}
function addressUpdate(currentRowID)
{

$("[id=tiperr]").remove();
   $("#h_sent_id").val($("#deliveryTo"+currentRowID).val())



	$("#utxtsend_name1").val($("#lab_name1_"+currentRowID).html());

   $("#utxtsend_name2").val($("#lab_name2_"+currentRowID).html());
	 try
{
   var arr=new Array();

   arr=$("#lab_zip_"+currentRowID).html().split('-');//;

  $("#uzipcode1").val(arr[0]);

   $("#uzipcode2").val(arr[1]);

   }
	catch (e)
	{
	}

   var loca_cd=$("#h_local_cd_"+currentRowID).val()

   $("#uselarea").get(0).selectedIndex=0;

  // alert(loca_cd);

  $("#uselarea option[value="+loca_cd+"]").attr("selected", true);
  // $("#uselarea").val($("#h_local_cd_"+currentRowID).val());


   $("#utxtcity").val($("#lab_treet_name_"+currentRowID).html());

   $("#utxtaddress").val($("#lab_sent_address_"+currentRowID).html());
  try
{
	var arr=new Array();

   arr=$("#lab_tel_"+currentRowID).html().split('-');//;


  $("#utxttele0").val(arr[0]);

   $("#utxttele1").val(arr[1]);

	$("#utxttele2").val(arr[2]);

	}
	catch(e)
	{


	}


addRowByID(currentRowID);


}
var row_count = 0;
var test=0;

 function addRowByID(currentRowID){

 try{


	$("#wrapper").append($("#Tip"));

	$("#Tip").hide();

	$('#newtr').remove();



	}catch(e){

	}



var table1 = $('#tabaddress');
var firstTr = table1.find('tbody>tr:first');
var row = $("<tr id='newtr'></tr>");

 var td = $("<th> <label for='deliveryTo2'>【変更住所】</label><br>　<em>（●は必須入力項目）</em> </th>");

 row.append(td);

var td = $("<td  colspan='1' ></td>");

  $("#Tip").show();

  //$("#Tip").css('opacity',0.7).fadeIn();

td.append($("#Tip"));

 row.append(td);

var aa=parseInt(currentRowID);

$("#tabaddress tr:eq("+aa+")").after(row);

$("#h_updateNumber").val(currentRowID);


row_count++;


	  }

 function  submitAddress()

 {
 var sendid=$("#h_sent_id").val();

var name1=$("#utxtsend_name1").val();

var name2=$("#utxtsend_name2").val();

var zipcode=$("#uzipcode1").val()+"-"+$("#uzipcode2").val();

var loca_cd=$("#uselarea").val();

var local_name=$("#uselarea").find("option:selected").text();

// alert(local_name);
 // alert(sendid);


var treet_name=$("#utxtcity").val();

var sent_address=$("#utxtaddress").val();

var sent_tel_number=$("#utxttele0").val()+"-"+$("#utxttele1").val()+"-"+$("#utxttele2").val();



 $.ajax({url:"{{'pc/Order/ajaxUpdateAddress'|U}}",type:"POST",async:false,data:"send_id="+sendid+"&name1="+name1+"&name2="+name2+"&zipcode="+zipcode+"&loca_cd="+loca_cd+"&treet_name="+treet_name+"&sent_address="+sent_address+"&sent_tel_number="+sent_tel_number,
		success: function(msg){
		if($.trim(msg)=="1")
		{
            var currentRowID=$("#h_updateNumber").val();

            $("#lab_name1_"+currentRowID).html(name1);

            $("#lab_name2_"+currentRowID).html(name2);

            $("#lab_zip_"+currentRowID).html(zipcode);

            $("#h_local_cd_"+currentRowID).val(loca_cd)

            $("#lab_local_name_"+currentRowID).html(local_name);

            $("#lab_treet_name_"+currentRowID).html(treet_name);

            $("#lab_sent_address_"+currentRowID).html(sent_address);

            $("#lab_tel_"+currentRowID).html(sent_tel_number);


            $("#wrapper").append($("#Tip"));

	            $("#Tip").hide();

	            $('#newtr').remove();

	            //alert("update succeed");

	        }
	        else
	        {

	        eval(msg);

	        }
		//	document.getElementById("showbox2").innerHTML=msg;
		   }

	});


 return false;

 }

 function selchange(obj)
 {


 $("#h_local_name").val($("#selarea").find("option:selected").text());

 // alert($("#h_local_name").val());

 }

 function sel_change(obj)
 {

 $("#h_r_local_name").val($("#rselarea").find("option:selected").text());

// alert($("#h_r_local_name").val());

 }

 function cbk_change(obj)
 {

	 {{if !$Login_Tag }}
  if($(obj).prop("checked"))
  {
	  $("#sendaddressdiv").show();
  }
  else
  {
	  $("#sendaddressdiv").hide();
  }
{{else}}
//$("#registeraddressdiv input").prop("disabled",true)
//$("#registeraddressdiv select").prop("disabled",true)
	{{/if}}
 // $("#h_local_name").val($("#selarea").find("option:selected").text());
 //h_r_local_name

 }

    </script>
</head>
<body>
    <div id="wrapper">
        <input type="hidden" id="h_sent_id" value="">
        <input type="hidden" id="h_updateNumber" value="">
        <div style="display: none" id="Tip">
            <tr id="newrow">
                <td id="small_table_Tip">
                    <table>
                        <tbody>
                            <tr>
                                <th class="require" name="tdname" id="tdname">
                                    <em>●</em>氏名（漢字）
                                </th>
                                <td class="must">
                                    必須
                                </td>
                                <td>
                                    <input type="text" name="utxtsend_name1" id="utxtsend_name1" value="" size="18">
                                    <input type="text" name="utxtsend_name2" id="utxtsend_name2" value="" size="18">
                                </td>
                            </tr>
                            <tr>
                                <th class="require">
                                    <em>●</em>郵便番号
                                </th>
                                <td class="must">
                                    必須
                                </td>
                                <td>
                                    <input type="text" name="uzipcode1" id="uzipcode1" value="" maxlength="3" size="3">
                                    -<input type="text" name="uzipcode2" id="uzipcode2" value="" maxlength="4" size="4">
                                    <input type="button" name="uzipBtn" value="検索" onclick="cart.action='/shop/cart/zipcode/#zipcode_pdata';cart.submit();"
                                        onkeypress="cart.action='/shop/cart/zipcode/#zipcode_pdata';cart.submit();">
                                </td>
                            </tr>
                            <tr>
                                <th class="require">
                                    <em>●</em>都道府県
                                </th>
                                <td class="must">
                                    必須
                                </td>
                                <td>
                                    <select name="uselarea" id="uselarea">
                                        <option selected="selected" value="">選択して下さい</option>
                                        {{foreach name=goodloop from=$local_data item=i}}
                                        <option value="{{$i.local_cd}}">{{$i.local_name}}</option>
                                        {{/foreach}}
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <th class="require">
                                    <em>●</em>市区郡
                                </th>
                                <td class="must">
                                    必須
                                </td>
                                <td>
                                    <input type="text" name="utxtcity" id="utxtcity" value="" maxlength="100" size="40">
                                </td>
                            </tr>
                            <tr>
                                <th class="require">
                                    <em>●</em>それ以降の住所
                                </th>
                                <td class="must">
                                    必須
                                </td>
                                <td>
                                    <input type="text" name="utxtaddress" id="utxtaddress" value="" maxlength="100" size="40">
                                </td>
                            </tr>
                            <tr>
                                <th class="require">
                                    <em>●</em>電話番号
                                </th>
                                <td class="must">
                                    必須
                                </td>
                                <td>
                                    <input type="text" name="utxttele0" id="utxttele0" value="" maxlength="5" size="5">
                                    -<input type="text" name="utxttele1" id="utxttele1" value="" maxlength="5" size="5">
                                    -<input type="text" name="utxttele2" id="utxttele2" value="" maxlength="4" size="5">
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3" align="center">
                                    <input type="button" name="updateAddress" onclick="return UpdateCheck()" width="00"
                                        value="確認する">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <input type="button" name="updateAddress" onclick="return CancelUpdate()" width="30"
                                        value="  取消  ">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </div>
        <noscript>
            このサイトはJavaScriptがオンになっていないと正常に表示されません</noscript>
        {{$pc_head}}
        <center>
            <span style="color: red;">{{$errmsg}}</span>
        </center>
        <ol id="pan">
            <li><a href="{{'pc/Top/index'|U}}">ホーム</a></li>
            <li><a href="{{'pc/Cart/index'|U}}">買い物カゴ</a></li>
            <li>ご注文</li>
        </ol>
        <section id="main">
			<form name="order" id="form_order" action="{{'pc/Order/check'|U}}"
				method="post" target="_top">
				<div id="main_inner">
					<input type="hidden" id="h_local_name" name="h_local_name"
						value="{{$addressinfo.localname}}">
					<div id="top_detail">
						<div id="cart">
							<h1>ご注文内容のご確認</h1>

							<div id="cart_detail">
								<table border="0" cellpadding="0" cellspacing="1">
									<thead>
										<tr>
											<th>商品名</th>
											<!--	<th>販売価格</th>-->
											<th>数量</th>
											<th>小計</th>

										</tr>
									</thead>
									<tbody id="rowbody" rowcount="{{$good_data|@count}}">
										{{foreach name=goodloop from=$good_data item=j}}
										<tr id="tr_{{$smarty.foreach.goodloop.index}}"
											goodid="{{$j.id}}">
											<td class="goods"><a href=""><img
													src="{{$j.goods_image}}" alt="{{$j.goods_name}}"></a> <a
												href="">{{$j.goods_name}}</a><br>
												<p class="price"
													id="price_{{$smarty.foreach.goodloop.index}}">¥{{$j.goods_unitprice|number_format}}
												</p></td>
											<td align="center" class="num">
												<p id="orderNum_{{$smarty.foreach.goodloop.index}}">{{$j.goodnum}}</p>
												<!--	<input type="image" onclick="changeNum({{$smarty.foreach.goodloop.index}});return false;" name="selectMethod[update]" src="pc/assets/images/btns/btn_cart_reload.gif" width="22" height="22" title="このボタンをクリックするとカーとの中身を更新します" align="absmiddle">-->
											</td>
											<td class="price"
												id="sumPrice_{{$smarty.foreach.goodloop.index}}">¥{{$j.goodnum*$j.goods_unitprice|number_format}}</td>
											<!--		<td class="delete"><input type="checkbox" id="chk_{{$smarty.foreach.goodloop.index}}"  value="1"></td>-->
										</tr>
										{{/foreach}}


									</tbody>

									<tfoot>
										<tr>
											<td>&nbsp;</td>

											<td class="txt">商品合計</td>
											<td class="price" id="td_SumgoodsPrice"
												value="{{$extraprice.SumPrice|number_format}}" >¥{{$extraprice.SumPrice|number_format}}</td>
										</tr>
										<tr>
											<td>&nbsp;</td>

											<td class="txt">送料(手数料)</td>
											<td class="price" id="td_sendPrice"
												value="{{$extraprice.sendprice+$extraprice.buyingprice|string_format:'%.2f'}}">¥{{$extraprice.sendprice+$extraprice.buyingprice|number_format}}</td>
										</tr>
                                        {{if $taxtype==1}}
										<tr>
											<td>&nbsp;</td>

											<td class="txt">税込</td>
											<td class="price">¥{{$extraprice.tax|number_format}}</td>
										</tr>
                                        {{/if}}
										<tr>
											<td>&nbsp;</td>

											<td class="txt2">合計額</td>
											<td class="price2" id="td_sumPrice"
												value="{{$extraprice.buyingprice+$extraprice.sendprice+$extraprice.tax+$extraprice.SumPrice|number_format}}" ><em>¥{{$extraprice.buyingprice+$extraprice.sendprice+$extraprice.tax+$extraprice.SumPrice|number_format}}</em></td>
										</tr>
									</tfoot>
								</table>
							</div>


							<h1>お支払い方法・配送方法</h1>
							<div class="cart_table">
								<table border="0" cellpadding="0" cellspacing="1">
									<thead>
										<tr>
											<th>選択</th>
											<th>お支払い方法＋配送方法</th>
											<th>手数料</th>
											<th>送料</th>
											<th>配送日の目安</th>
										</tr>
									</thead>
									<tbody>

										{{foreach name=goodloop from=$order_buy item=i}}
										<tr>
											<td align="center"><input type="radio"
												onclick="getRadio({{$smarty.foreach.goodloop.index}})"
												value="{{$i.id}}" name="payway" idvalue="{{$i.ordersendid}}"
												id="payway" {{ if $i.id==
												$sendinfo.id }}  checked  {{ elseif $sendinfo.id
												eq "" and $smarty.foreach.goodloop.index eq 0 }} checked  {{/if}}></td>
											<th name="th_name{{$smarty.foreach.goodloop.index}}"
												id="th_sendname{{$smarty.foreach.goodloop.index}}"
												value="{{$i.id}}" idvalue="{{$i.ordersendid}}">{{$i.send_name}}</th>
											<td name="td_pay{{$smarty.foreach.goodloop.index}}"
												id="td_pay{{$smarty.foreach.goodloop.index}}"
												value="{{ $i.buyingprice|number_format}}" >{{ if
												$i.buyingprice ==0 }}<em>無料</em>{{ else }} {{
												$i.buyingprice|number_format}} 円 {{/if}}{{ if
												$i.payfreeset == "1"}}</br> <small>※{{
													$i.payfreeprice|number_format}}円以上ご購入で無料</small>{{/if}}


											</td>
											<td name="td_send{{$smarty.foreach.goodloop.index}}"
												id="td_send{{$smarty.foreach.goodloop.index}}"
												value="{{ $i.sendprice|number_format}}" >{{ if
												$i.sendprice ==0 }}<em>無料</em>{{ else }} {{
												$i.sendprice|number_format}} 円 {{/if}}{{ if
												$i.sendfreeset == "1"}}</br>
											<small>※{{
													$i.sendfreeprice|number_format}}円以上ご購入で無料</small>{{/if}}
											</td>
											<td name="td_comment{{$smarty.foreach.goodloop.index}}">{{$i.sendcomment}}

											</td>

										</tr>
										{{/foreach}}
									</tbody>
								</table>
								※ご注文数や重さなどにより、発送方法が予告なく変更になる場合がございます。
							</div>

							<input type="hidden" id="h_card_state" name="h_card_state"
								value="">
							<h1 id="h1_card" {{if $cardinfo.cardstate eq "" and $card_Tag
								eq "1" }} style="display: block" {{elseif  $cardinfo.cardstate
								eq "1" }} style="display:block" {{ else }}style="display:none"{{/if}} >カード情報入力</h1>
							<div class="card_table" id="div_card" name="div_card"
								value="{{$card_Tag}}" {{if $cardinfo.cardstate
								eq "" and $card_Tag eq "1"}} style="display: block"
								{{elseif $cardinfo.cardstate eq "1" }} style="display: block"
								{{ else }}style="display: none"{{/if}} >
								<table border="0" cellpadding="0" cellspacing="1">
									<tbody>
										<tr>
											<th>カード番号</th>
											<td class="must">必須</td>
											<td><input name="txtcard" type="text" id="txtcard"
												 value="{{ $cardinfo.cardno }}"
												maxlength="50" size="50"> <span style="color: red;">{{$err_mes.msg_txtcard}}</span>
											</td>
											<script type="text/javascript">											    checkcardstate();</script>
										</tr>
										<tr>
											<th>有効期限</th>
											<td class="must">必須</td>
											<td><select title="月" name="sel_month">
													<option {{ if $cardinfo.carddate_month==
														"01" }} selected="selected" {{/if}} value="01">01</option>
													<option {{ if $cardinfo.carddate_month==
														"02" }} selected="selected" {{/if}} value="02">02</option>
													<option {{ if $cardinfo.carddate_month==
														"03" }} selected="selected" {{/if}} value="03">03</option>
													<option {{ if $cardinfo.carddate_month==
														"04" }} selected="selected" {{/if}} value="04">04</option>
													<option {{ if $cardinfo.carddate_month==
														"05" }} selected="selected" {{/if}} value="05">05</option>
													<option {{ if $cardinfo.carddate_month==
														"06" }} selected="selected" {{/if}} value="06">06</option>
													<option {{ if $cardinfo.carddate_month==
														"07" }} selected="selected" {{/if}} value="07">07</option>
													<option {{ if $cardinfo.carddate_month==
														"08" }} selected="selected" {{/if}} value="08">08</option>
													<option {{ if $cardinfo.carddate_month==
														"09" }} selected="selected" {{/if}} value="09">09</option>
													<option {{ if $cardinfo.carddate_month==
														"10" }} selected="selected" {{/if}} value="10">10</option>
													<option {{ if $cardinfo.carddate_month==
														"11" }} selected="selected" {{/if}} value="11">11</option>
													<option {{ if $cardinfo.carddate_month==
														"12" }} selected="selected" {{/if}} value="12">12</option>
											</select>月 / <select title="年" name="sel_year"> {{foreach
													name=goodloop from=$cardyear item=i}}
													<option {{ if $cardinfo.carddate_year
														eq $i.year}}selected="selected"
														{{/if}} value="{{$i.year}}">{{$i.year}}</option>
													{{/foreach}}
											</select> 年</td>
										</tr>
									</tbody>
								</table>
							</div>

							<h1>
								■注文者情報<input type="hidden" id="h_r_local_name"
									name="h_r_local_name" value="{{$registerAddrsee.local_name}}">
							</h1>
							<div class="cart_table" id="registeraddressdiv">
								<table>
									<tbody>
										<tr>
											<th>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</th>

											<td id="RegisterAddress">
												<table>
													<tbody>
														<tr>
															<th class="require" name="rdname" id="rdname"><em>●</em>氏名（漢字）</th>
															<td class="must">必須</td>
															<td><input type="text" name="rtxtsend_name1"
																id="rtxtsend_name1" 
																value="{{$registerAddrsee.sendname1}}" size="18">
																<input type="text" name="rtxtsend_name2"
																id="rtxtsend_name2" 
																value="{{$registerAddrsee.sendname2}}" size="18">
																<span style="color: red">{{$err_mes.msg_rsendname}}</span>
															</td>
														</tr>
														<tr>
															<th class="require"><em>●</em>氏名（フリガナ）</th>
															<td class="must">必須</td>
															<td><input type="text" name="rtxtsend_name_f1"
																id="rtxtsend_name_f1"
																
																value="{{$registerAddrsee.sendnamef1}}" size="18">
																<input type="text" name="rtxtsend_name_f2"
																id="rtxtsend_name_f2"
																
																value="{{$registerAddrsee.sendnamef2}}" size="18">
																<span style="color: red">{{$err_mes.msg_rsendnamef}}</span>
															</td>
														</tr>
														<tr>
															<th class="require"><em>●</em>郵便番号</th>
															<td class="must">必須</td>
															<td><input type="text" name="rzipcode1"
																id="rzipcode1" 
																value="{{$registerAddrsee.zipcode[0]}}" maxlength="3"
																size="3"> -<input type="text" name="rzipcode2"
																id="rzipcode2" 
																value="{{$registerAddrsee.zipcode[1]}}" maxlength="4"
																size="4"> {{if !$Login_Tag }}<input
																type="button" name="zipBtn" value="検索" class="searchAddress"
																>{{/if}}
																<span style="color: red">{{$err_mes.msg_rzipcode}}</span>
															</td>
														</tr>
														<tr>
															<th class="require"><em>●</em>都道府県</th>
															<td class="must">必須</td>
															<td><select name="rselarea"
																onchange="sel_change(this)" id="rselarea">
																	<option selected="selected" value="">選択して下さい</option>
																	{{foreach name=goodloop from=$local_data item=i}}
																	<option {{ if $registerAddrsee.local_cd
																		eq $i.local_cd  }} selected="selected"
																		{{/if}}  value="{{$i.local_cd}}">{{$i.local_name}}</option>
																	{{/foreach}}
															</select> <span style="color: red">{{$err_mes.msg_rlocal_cd}}</span>
															</td>
														</tr>
														<tr>
															<th class="require"><em>●</em>市区郡</th>
															<td class="must">必須</td>
															<td><input type="text" name="rtxtcity" id="rtxtcity"
																
																value="{{$registerAddrsee.treetname}}" maxlength="100"
																size="40"> <span style="color: red">{{$err_mes.msg_rtreetname}}</span>
															</td>

														</tr>
														<tr>
															<th class="require"><em>●</em>それ以降の住所</th>
															<td class="must">必須</td>
															<td><input type="text" name="rtxtaddress"
																id="rtxtaddress" 
																value="{{$registerAddrsee.address}}" maxlength="100"
																size="40"> <span style="color: red">{{$err_mes.msg_raddress}}</span>
															</td>
														</tr>
														<tr>
															<th class="require"><em>●</em>電話番号</th>
															<td class="must">必須</td>
															<td><input type="text" name="rtxttele0"
																id="rtxttele0" 
																value="{{$registerAddrsee.telno[0]}}" maxlength="5"
																size="5"> -<input type="text" name="rtxttele1"
																id="rtxttele1" 
																value="{{$registerAddrsee.telno[1]}}" maxlength="5"
																size="5"> -<input type="text" name="rtxttele2"
																id="rtxttele2" 
																value="{{$registerAddrsee.telno[2]}}" maxlength="4"
																size="5"> <span style="color: red">{{$err_mes.msg_rtelno}}</span>
															</td>
														</tr>
														<tr>

															<th>貴医院名・<br>貴技工所名（漢字）
															</th>
															<td>&nbsp;</td>
															<td><input type="text" name="rtxtcompany"
																id="rtxtcompany" 
																value="{{$registerAddrsee.officename}}" maxlength="200"
																size="40"></td>
														</tr>
														<tr>
															<th>貴医院名・<br>貴技工所名（フリガナ）
															</th>
															<td>&nbsp;</td>
															<td><input type="text" name="rtxtcruby_k"
																id="rtxtcruby_k" 
																value="{{$registerAddrsee.officenamef}}" maxlength="200"
																size="40"></td>
														</tr>
														<tr>
															<th class="require"><em>●</em>メールアドレス</th>
															<td class="must">必須</td>
															<td><input type="text" name="rtxtemail"
																id="rtxtemail" 
																value="{{$registerAddrsee.email}}" maxlength="100"
																size="40"> <span style="color: red">{{$err_mes.msg_remail}}</span>
															</td>
														</tr>
														
														<tr>
															<th class="require"><em>●</em>メールアドレス(確認用）</th>
															<td class="must">必須</td>
															<td><input type="text" name="rtxtemail2"
																id="rtxtemail2"
																value="{{$registerAddrsee.email2}}" maxlength="100"
																size="40"> <span style="color: red">{{$err_mes.msg_remail2}}</span>
															</td>
														</tr>
														
													</tbody>
												</table>
											</td>
											<td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
												&nbsp;</td>

										</tr>
									</tbody>
								</table>

							</div>

							{{if !$Login_Tag }} <input type="checkbox" id="ckb_register"
								{{if $addressinfo.address_name==
								"-1" }} checked {{/if}} onclick="cbk_change(this)"
								name="ckb_register" value="1">注文者情報と異なる配送先を入力する{{/if}} <br>
							<br>
							<div id="sendaddressdiv">
								<h1>
									お届け先指定 <input type="hidden" id="h_loginid"
										value="{{$Login_Tag}}">
								</h1>
								<div class="cart_table">
									<table border="0" cellpadding="0" id="tabaddress"
										cellspacing="1">
										<tbody>
											{{if $Login_Tag }} {{foreach name=goodloop from=$user_data
											item=i}}
											<tr id="tr_{{$smarty.foreach.goodloop.index}}">
												<th><input type="radio" onclick="CancelUpdate();addressradiochange();"
													name="deliveryTo"
													id="deliveryTo{{$smarty.foreach.goodloop.index}}"
													value="{{$i.sent_id }}" "{{ if $i.sent_id==
													$addressinfo.address_id }} checked {{elseif $addressinfo.address_id==
													"" and $smarty.foreach.goodloop.index==0 }} checked {{/if}}" >
													<label for="deliveryTo1"> 【<label
														id="lab_send_name{{$smarty.foreach.goodloop.index}}">{{$i.sent_name}}</label>】
												</label></th>
												<td id="td_name_zip_tel_{{$smarty.foreach.goodloop.index}}">
													{{if $i.sent_id neq -1}}
													<p>
														<a
															onClick="return addressUpdate({{$smarty.foreach.goodloop.index}})";>変更する</a>
													</p>{{/if}} <label
													id="lab_name1_{{$smarty.foreach.goodloop.index}}">{{$i.sent_name1}}</label>
													<label id="lab_name2_{{$smarty.foreach.goodloop.index}}">{{$i.sent_name2}}</label>
													様<br> 〒<label
													id="lab_zip_{{$smarty.foreach.goodloop.index}}">{{$i.sent_zipcode}}</label>
													<input type="hidden"
													id="h_local_cd_{{$smarty.foreach.goodloop.index}}"
													value="{{$i.sent_local_cd}}"> <label
													id="lab_local_name_{{$smarty.foreach.goodloop.index}}">{{$i.local_name}}</label>
													<label
													id="lab_treet_name_{{$smarty.foreach.goodloop.index}}">{{
														$i.sent_treet_name}}</label> <label
													id="lab_sent_address_{{$smarty.foreach.goodloop.index}}">{{$i.sent_address}}</label><br>
													<label id="lab_tel_{{$smarty.foreach.goodloop.index}}">{{$i.sent_tel_number}}</label>
												</td>
											</tr>
											{{ /foreach}} {{ /if }}
											<tr>
												<th>{{if $Login_Tag }} <input type="radio" otheraddr
													name="deliveryTo" onclick="CancelUpdate();addressradiochange();"
													id="deliveryTo{{$user_data|@count}}" value="0"
													"{{ if $addressinfo.address_id==
													"-1" }} checked  {{/if}}" > <label for="deliveryTo2">別登録住所</label><br>{{/if}}
													<em>{{if $Login_Tag }}変更できます{{/if}}（●は必須入力項目）</em>

												</th>
												<td id="small_table">
													<table id="otheraddrtable">
														<tbody>
															<tr>
																<th class="require" name="tdname" id="tdname"><em>●</em>氏名（漢字）</th>
																<td class="must">必須</td>
																<td><input type="text" name="txtsend_name1"
																	id="txtsend_name1" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.sendname1}}{{/if}}" size="18">
																	<input type="text" name="txtsend_name2"
																	id="txtsend_name2" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.sendname2}}{{/if}}" size="18">
																	<span style="color: red">{{$err_mes.msg_sendname}}</span>
																</td>
															</tr>
															<tr>
																<th class="require"><em>●</em>氏名（フリガナ）</th>
																<td class="must">必須</td>
																<td><input type="text" name="txtsend_name_f1"
																	id="txtsend_name_f1"
																	
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.sendnamef1}}{{/if}}" size="18">
																	<input type="text" name="txtsend_name_f2"
																	id="txtsend_name_f2"
																	
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.sendnamef2}}{{/if}}" size="18">
																	<span style="color: red">{{$err_mes.msg_sendnamef}}</span>
																</td>
															</tr>
															<tr>
																<th class="require"><em>●</em>郵便番号</th>
																<td class="must">必須</td>
																<td><input type="text" name="zipcode1"
																	id="zipcode1" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.zipcode[0]}}{{/if}}" maxlength="3"
																	size="3"> -<input type="text" name="zipcode2"
																	id="zipcode2" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.zipcode[1]}}{{/if}}" maxlength="4"
																	size="4"> <input type="button" name="zipBtn"
																	value="検索"
																	onClick="cart.action='/shop/cart/zipcode/#zipcode_pdata';cart.submit();"
																	onKeyPress="cart.action='/shop/cart/zipcode/#zipcode_pdata';cart.submit();">
																	<span style="color: red">{{$err_mes.msg_zipcode}}</span>
																</td>
															</tr>
															<tr>
																<th class="require"><em>●</em>都道府県</th>
																<td class="must">必須</td>
																<td><select name="selarea" id="selarea"
																	onchange="selchange(this)">
																		<option {{ if $addressinfo.local_cd==
																			""  }} selected="selected" {{/if}} value="">選択して下さい</option>
																		{{foreach name=goodloop from=$local_data item=i}}
																		<option {{ if $addressinfo.local_cd eq $i.local_cd
																			and $addressinfo.address_id==
																			"-1" }} selected="selected"
																			{{/if}}  value="{{$i.local_cd}}">{{$i.local_name}}</option>
																		{{/foreach}}

																</select> <span style="color: red">{{$err_mes.msg_local_cd}}</span>
																</td>
															</tr>
															<tr>
																<th class="require"><em>●</em>市区郡</th>
																<td class="must">必須</td>
																<td><input type="text" name="txtcity" id="txtcity"
																	
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.treetname}}{{/if}}"  maxlength="100"
																	size="40"> <span style="color: red">{{$err_mes.msg_treetname}}</span>
																</td>
															</tr>
															<tr>
																<th class="require"><em>●</em>それ以降の住所</th>
																<td class="must">必須</td>
																<td><input type="text" name="txtaddress"
																	id="txtaddress" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.address}}{{/if}}" maxlength="100"
																	size="40"> <span style="color: red">{{$err_mes.msg_address}}</span>
																</td>
															</tr>
															<tr>
																<th class="require"><em>●</em>電話番号</th>
																<td class="must">必須</td>
																<td><input type="text" name="txttele0"
																	id="txttele0" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.telno[0]}}{{/if}}" maxlength="5"
																	size="5"> -<input type="text" name="txttele1"
																	id="txttele1" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.telno[1]}}{{/if}}" maxlength="5"
																	size="5"> -<input type="text" name="txttele2"
																	id="txttele2" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.telno[2]}}{{/if}}" maxlength="4"
																	size="5"> <span style="color: red">{{$err_mes.msg_telno}}</span>
																</td>
															</tr>
															<tr>
																<th>貴医院名・<br>貴技工所名（漢字）
																</th>
																<td>&nbsp;</td>
																<td><input type="text" name="txtcompany"
																	id="txtcompany" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.officename}}{{/if}}" maxlength="200"
																	size="40"></td>
															</tr>
															<tr>
																<th>貴医院名・<br>貴技工所名（フリガナ）
																</th>
																<td>&nbsp;</td>
																<td><input type="text" name="txtcruby_k"
																	id="txtcruby_k" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.officenamef}}{{/if}}"  maxlength="200"
																	size="40"></td>
															</tr>
															{{if $Login_Tag }}
                                                            <tr>
                                                            <th>アドシス帳に保存する</th>
                                                            <td><input type="checkbox" name="chknewaddress" id="chknewaddress" {{if $addressinfo.newaddress neq ''}}checked{{/if}} onclick="checknewaddress()" value="1"/></td>
                                                            <td>登録名<input type="text" name="txtnewaddress"
																	id="txtnewaddress" 
																	value="{{if $addressinfo.address_id=="
																	-1"}}{{$addressinfo.newaddress}}{{/if}}"  maxlength="200"
																	size="40"><span style="color: red">{{$err_mes.msg_newaddress}}</span></td>
                                                            </tr>
                                                            <script type="text/javascript">
                                                                checknewaddress();
                                                            </script>
                                                            {{/if}}
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</div>

							<script type="text/javascript">
							    addressradiochange();
							    var cbk = document.getElementById("ckb_register");

							    //	$("#ckb_register").;

							    cbk_change(cbk);
							    //var str_id=$("#payway").attr("idvalue");

					</script>
							<dl id="order_check">
								<dt>
									<a href="{{'pc/Cart/index'|U}}" title="戻る">戻る</a>
								</dt>
								<dd>
									<input type="Submit" name="selectMethod[next]"
										onClick="return lasterCheck()"  title="内容を確認する">
								</dd>
							</dl>
							<br clear="all">
						</div>
					</div>
				</div>
			</form>
		</section>
        <section id="r_clm">
			<h4 class="begginer">はじめてのお客様へ</h4>
			<ul id="begginer">
				<li><a href="">商品のお届けについて</a></li>
				<li><a href="">お支払い方法について</a></li>
				<li><a href="">代金引換について</a></li>
				<li><a href="">カード決済について</a></li>
				<li><a href="">返品交換について</a></li>
			</ul>

			<h4>Information</h4>
			<ul id="info">
				<li><a href="">ご利用案内</a></li>
				<li><a href="">求人案内</a></li>
				<li><a href="">図書取扱店</a></li>
				<li><a href="">トピックス</a></li>
				<li><a href="">販売支援</a></li>
				<li><a href="">会社概要</a></li>
				<li><a href="">お問い合せ</a></li>
			</ul>
			{{$chartsing}}
			<script
				src="https://seal.verisign.com/getseal?host_name=www.dental-diamond.co.jp&size=M&use_flash=YES&use_transparent=YES&lang=ja"></script>
		</section>
        <br clear="all">
        {{$pc_foot}}
    </div>
      <script type="text/javascript">
		$(function(){
	
			$('.searchAddress').live('click',function(){
				var post1 = $('input[name=rzipcode1]').val();
				var post2 = $('input[name=rzipcode2]').val();
				if(post1 == "" || post2 == ""){return;}
				var post = post1 +""+ post2;
				zip2address(post, function(address) {
				if (address) {
					$("#rtxtcity").val(address.city);
					document.getElementById("rselarea").selectedIndex=address.code;
					
				}
				else {
					alert("見つかりませんでした。。\n入力した郵便番号に誤りがないか、お確かめ下さい。");
				}
				});
				
			});
			
			
		});
</script>
</body>
</html>
